package edu.suda.LoopCodePlus.service.impl;

import edu.suda.LoopCodePlus.entity.Course;
import edu.suda.LoopCodePlus.mapper.CourseMapper;
import edu.suda.LoopCodePlus.service.CourseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CourseServiceImpl implements CourseService {
    @Autowired
    private CourseMapper courseMapper;
    @Override
    public boolean save(Course course) {
        try{
            courseMapper.insert_courseById(course);
            return true;
        }catch (Exception e){
            e.printStackTrace();
            return false;
        }
    }
}
